home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news text
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 72 65 | 64 2e 77 65 65 67 2e 75 |Path: re|d.weeg.u|
|00000010| 69 6f 77 61 2e 65 64 75 | 21 72 6f 62 69 6e 73 6f |iowa.edu|!robinso|
|00000020| 6e 0a 46 72 6f 6d 3a 20 | 54 68 65 20 41 6d 6f 72 |n.From: |The Amor|
|00000030| 70 68 6f 75 73 20 4d 61 | 73 73 20 3c 72 6f 62 69 |phous Ma|ss <robi|
|00000040| 6e 73 6f 6e 40 62 6c 75 | 65 2e 77 65 65 67 2e 75 |nson@blu|e.weeg.u|
|00000050| 69 6f 77 61 2e 65 64 75 | 3e 0a 4e 65 77 73 67 72 |iowa.edu|>.Newsgr|
|00000060| 6f 75 70 73 3a 20 63 6f | 6d 70 2e 6c 61 6e 67 2e |oups: co|mp.lang.|
|00000070| 63 0a 53 75 62 6a 65 63 | 74 3a 20 52 65 3a 20 44 |c.Subjec|t: Re: D|
|00000080| 65 74 65 72 6d 69 6e 69 | 6e 67 20 74 68 65 20 6c |etermini|ng the l|
|00000090| 65 6e 67 74 68 20 6f 66 | 20 61 6e 20 69 6e 74 20 |ength of| an int |
|000000a0| 69 6e 20 73 74 72 69 6e | 67 20 66 6f 72 6d 0a 44 |in strin|g form.D|
|000000b0| 61 74 65 3a 20 57 65 64 | 2c 20 31 33 20 4d 61 72 |ate: Wed|, 13 Mar|
|000000c0| 20 31 39 39 36 20 31 36 | 3a 34 32 3a 34 30 20 2d | 1996 16|:42:40 -|
|000000d0| 30 36 30 30 0a 4f 72 67 | 61 6e 69 7a 61 74 69 6f |0600.Org|anizatio|
|000000e0| 6e 3a 20 55 6e 69 76 65 | 72 73 69 74 79 20 6f 66 |n: Unive|rsity of|
|000000f0| 20 49 6f 77 61 2c 20 49 | 6f 77 61 20 43 69 74 79 | Iowa, I|owa City|
|00000100| 2c 20 49 41 2c 20 55 53 | 41 0a 44 69 73 74 72 69 |, IA, US|A.Distri|
|00000110| 62 75 74 69 6f 6e 3a 20 | 77 6f 72 6c 64 0a 4d 65 |bution: |world.Me|
|00000120| 73 73 61 67 65 2d 49 44 | 3a 20 3c 50 69 6e 65 2e |ssage-ID|: <Pine.|
|00000130| 41 33 32 2e 33 2e 39 31 | 2e 39 36 30 33 31 33 31 |A32.3.91|.9603131|
|00000140| 36 31 38 33 35 2e 39 30 | 37 34 30 44 2d 31 30 30 |61835.90|740D-100|
|00000150| 30 30 30 40 72 65 64 2e | 77 65 65 67 2e 75 69 6f |000@red.|weeg.uio|
|00000160| 77 61 2e 65 64 75 3e 0a | 4e 4e 54 50 2d 50 6f 73 |wa.edu>.|NNTP-Pos|
|00000170| 74 69 6e 67 2d 48 6f 73 | 74 3a 20 72 65 64 2e 77 |ting-Hos|t: red.w|
|00000180| 65 65 67 2e 75 69 6f 77 | 61 2e 65 64 75 0a 4d 69 |eeg.uiow|a.edu.Mi|
|00000190| 6d 65 2d 56 65 72 73 69 | 6f 6e 3a 20 31 2e 30 0a |me-Versi|on: 1.0.|
|000001a0| 43 6f 6e 74 65 6e 74 2d | 54 79 70 65 3a 20 54 45 |Content-|Type: TE|
|000001b0| 58 54 2f 50 4c 41 49 4e | 3b 20 63 68 61 72 73 65 |XT/PLAIN|; charse|
|000001c0| 74 3d 55 53 2d 41 53 43 | 49 49 0a 58 2d 53 65 6e |t=US-ASC|II.X-Sen|
|000001d0| 64 65 72 3a 20 72 6f 62 | 69 6e 73 6f 6e 40 72 65 |der: rob|inson@re|
|000001e0| 64 2e 77 65 65 67 2e 75 | 69 6f 77 61 2e 65 64 75 |d.weeg.u|iowa.edu|
|000001f0| 0a 49 6e 2d 52 65 70 6c | 79 2d 54 6f 3a 20 3c 33 |.In-Repl|y-To: <3|
|00000200| 31 34 36 44 30 35 38 2e | 44 44 37 40 63 62 6d 2e |146D058.|DD7@cbm.|
|00000210| 63 6f 6d 3e 20 0a 0a 4f | 6e 20 57 65 64 2c 20 31 |com> ..O|n Wed, 1|
|00000220| 33 20 4d 61 72 20 31 39 | 39 36 2c 20 44 61 76 65 |3 Mar 19|96, Dave|
|00000230| 20 50 61 79 6e 65 20 77 | 72 6f 74 65 3a 0a 0a 3e | Payne w|rote:..>|
|00000240| 20 43 6f 6e 73 69 64 65 | 72 20 74 68 69 73 3a 0a | Conside|r this:.|
|00000250| 3e 20 0a 3e 20 49 20 68 | 61 76 65 20 61 20 76 61 |> .> I h|ave a va|
|00000260| 72 69 61 62 6c 65 20 6f | 66 20 74 79 70 65 20 69 |riable o|f type i|
|00000270| 6e 74 2c 20 61 6e 64 20 | 49 20 77 6f 75 6c 64 20 |nt, and |I would |
|00000280| 6c 69 6b 65 20 74 6f 20 | 75 73 65 20 74 68 65 20 |like to |use the |
|00000290| 73 70 72 69 6e 74 66 28 | 29 20 0a 3e 20 66 75 6e |sprintf(|) .> fun|
|000002a0| 63 74 69 6f 6e 20 74 6f | 20 77 72 69 74 65 20 74 |ction to| write t|
|000002b0| 68 69 73 20 76 61 72 69 | 61 62 6c 65 20 74 6f 20 |his vari|able to |
|000002c0| 61 20 73 74 72 69 6e 67 | 2e 20 20 48 6f 77 65 76 |a string|. Howev|
|000002d0| 65 72 2c 20 49 20 77 61 | 6e 74 20 74 6f 20 0a 3e |er, I wa|nt to .>|
|000002e0| 20 64 79 6e 61 6d 69 63 | 61 6c 6c 79 20 61 6c 6c | dynamic|ally all|
|000002f0| 6f 63 61 74 65 20 74 68 | 65 20 73 70 61 63 65 20 |ocate th|e space |
|00000300| 66 6f 72 20 74 68 65 20 | 73 74 72 69 6e 67 2c 20 |for the |string, |
|00000310| 61 6e 64 20 6f 6e 6c 79 | 20 6d 61 6c 6c 6f 63 20 |and only| malloc |
|00000320| 65 6e 6f 75 67 68 20 0a | 3e 20 73 70 61 63 65 20 |enough .|> space |
|00000330| 74 6f 20 68 6f 6c 64 20 | 74 68 65 20 69 6e 74 2e |to hold |the int.|
|00000340| 0a 0a 20 20 54 68 69 73 | 20 77 69 6c 6c 20 67 65 |.. This| will ge|
|00000350| 74 20 72 65 74 75 72 6e | 20 74 68 65 20 22 6c 65 |t return| the "le|
|00000360| 6e 67 74 68 22 20 6f 66 | 20 61 6e 20 69 6e 74 65 |ngth" of| an inte|
|00000370| 67 65 72 20 2d 2d 20 69 | 74 20 72 65 74 75 72 6e |ger -- i|t return|
|00000380| 73 20 34 20 66 6f 72 20 | 6e 20 3d 20 0a 31 32 33 |s 4 for |n = .123|
|00000390| 34 20 61 6e 64 20 35 20 | 66 6f 72 20 6e 20 3d 20 |4 and 5 |for n = |
|000003a0| 2d 31 32 33 34 2e 0a 0a | 23 69 6e 63 6c 75 64 65 |-1234...|#include|
|000003b0| 20 3c 73 74 64 69 6f 2e | 68 3e 0a 23 69 6e 63 6c | <stdio.|h>.#incl|
|000003c0| 75 64 65 20 3c 73 74 64 | 6c 69 62 2e 68 3e 0a 23 |ude <std|lib.h>.#|
|000003d0| 69 6e 63 6c 75 64 65 20 | 3c 6d 61 74 68 2e 68 3e |include |<math.h>|
|000003e0| 0a 0a 69 6e 74 20 4e 75 | 6d 4c 65 6e 28 69 6e 74 |..int Nu|mLen(int|
|000003f0| 20 6e 29 0a 7b 0a 20 20 | 20 20 69 6e 74 20 6c 20 | n).{. | int l |
|00000400| 3d 20 31 3b 0a 0a 20 20 | 20 20 69 66 20 28 6e 20 |= 1;.. | if (n |
|00000410| 3c 20 30 29 20 7b 0a 09 | 6e 20 3d 20 61 62 73 28 |< 0) {..|n = abs(|
|00000420| 6e 29 3b 0a 09 2b 2b 6c | 3b 0a 20 20 20 20 7d 0a |n);..++l|;. }.|
|00000430| 0a 20 20 20 20 77 68 69 | 6c 65 20 28 6e 20 3e 3d |. whi|le (n >=|
|00000440| 20 31 30 29 20 7b 0a 09 | 6e 20 2f 3d 20 31 30 3b | 10) {..|n /= 10;|
|00000450| 0a 09 2b 2b 6c 3b 0a 20 | 20 20 20 7d 0a 0a 20 20 |..++l;. | }.. |
|00000460| 20 20 72 65 74 75 72 6e | 20 6c 3b 0a 7d 0a 0a 20 | return| l;.}.. |
|00000470| 20 49 74 20 63 61 6e 20 | 62 65 20 74 72 69 76 69 | It can |be trivi|
|00000480| 61 6c 6c 79 20 6d 6f 64 | 69 66 69 65 64 20 74 6f |ally mod|ified to|
|00000490| 20 74 61 6b 65 20 74 68 | 65 20 6c 65 6e 67 74 68 | take th|e length|
|000004a0| 73 20 6f 66 20 6c 6f 6e | 67 73 2c 20 6f 72 20 74 |s of lon|gs, or t|
|000004b0| 6f 20 72 65 74 75 72 6e | 20 0a 61 20 73 69 7a 65 |o return| .a size|
|000004c0| 5f 74 20 69 6e 73 74 65 | 61 64 20 6f 66 20 61 6e |_t inste|ad of an|
|000004d0| 20 69 6e 74 20 69 66 20 | 79 6f 75 20 70 72 65 66 | int if |you pref|
|000004e0| 65 72 2e 0a 0a 2f 2a 2a | 4a 61 6d 65 73 20 52 6f |er.../**|James Ro|
|000004f0| 62 69 6e 73 6f 6e 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |binson**|********|
|00000500| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 20 20 20 |********|***** |
|00000510| 20 20 20 20 20 20 20 20 | 20 0a 20 20 22 49 66 20 | | . "If |
|00000520| 61 20 66 61 74 61 6c 20 | 65 72 72 6f 72 20 6f 63 |a fatal |error oc|
|00000530| 63 75 72 73 2c 20 74 68 | 65 20 70 72 6f 67 72 61 |curs, th|e progra|
|00000540| 6d 20 73 68 6f 75 6c 64 | 20 6e 6f 74 20 62 65 20 |m should| not be |
|00000550| 61 6c 6c 6f 77 65 64 20 | 74 6f 20 63 6f 6e 74 69 |allowed |to conti|
|00000560| 6e 75 65 2e 22 0a 20 2d | 2d 20 4f 72 61 63 6c 65 |nue.". -|- Oracle|
|00000570| 20 50 72 6f 2a 43 20 55 | 73 65 72 27 73 20 47 75 | Pro*C U|ser's Gu|
|00000580| 69 64 65 20 20 20 20 20 | 20 20 20 20 2a 2a 2a 2a |ide | ****|
|00000590| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 6a 61 6d 65 73 2d 72 |********|*james-r|
|000005a0| 6f 62 69 6e 73 6f 6e 40 | 75 69 6f 77 61 2e 65 64 |obinson@|uiowa.ed|
|000005b0| 75 2a 2a 2f 0a | |u**/. | |
+--------+-------------------------+-------------------------+--------+--------+